Repository navigation
Stop installing the benchmarks harness as a top-level package - #4148
Merged
Merged
Conversation
find_packages(exclude=["tests*"]) also picked up the benchmarks/ harness, so since 4.5.0rc0 the wheel installs a top-level `benchmarks` package. As a regular package in site-packages it shadows a benchmarks/ directory in any project that installs dash: `import benchmarks.foo` then fails with ModuleNotFoundError. Restrict packaging to dash and dash.*. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
M-Colley
added a commit
to M-Colley/Monocular-OSM-Localization
that referenced
this pull request
Nov 15, 2026
…plotly/dash#4148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Since 4.5.0rc0 the dash wheel installs a top-level
benchmarkspackage next todash(benchmarks/__init__.py,bench_app.py,run.py,scenarios.py).setup.pyusesfind_packages(exclude=["tests*"]), which picks up thebenchmarks/harness because it has an__init__.py.As a regular package in site-packages, it shadows a
benchmarks/directory in any project that installs dash. A project with its ownbenchmarks/folder (no__init__.py) breaks as soon as dash 4.5.0 is installed:The same import works with dash 4.4.1. We hit this in the CI of a downstream project that depends on dash.
This PR changes
setup.pytofind_packages(include=["dash", "dash.*"]), so onlydashand its subpackages are packaged. The harness runs as before (python -m benchmarks.runfrom the repo root, as inbenchmarks.yml), which does not need it installed.benchmarks, none added.dash,dash-4.5.0.data,dash-4.5.0.dist-info, the same set as the 4.4.1 wheel.tests/unit/test_packaging.pyrunssetup.pywithsetuptools.setupmocked. Ondevit fails withassert ['benchmarks'] == [].Contributor Checklist
dev(fix or chore) ornext(feature, new API, breaking change), see Which branch to targetfind_packagestodashanddash.*tests/unit/test_packaging.pypasses. black 22.3.0, flake8 7.3.0 and pylint 3.0.3 (the versions inrequirements/ci.txt) are clean on the changed files.tests/uniton Windows with Python 3.12, using the generated components from the 4.5.0 wheel because I did not run the JS build. The only failures were the Windows path tests intests/unit/pagesandtest_process_server_smoke, which fail the same way on unmodifieddev. Two MCP background-callback tests failed once under the full run and passed on every rerun.optionals
CHANGELOG.md🤖 Generated with Claude Code